package main

import (
	"examination/rpc/grpc"
	"examination/rpc/init"
	"log"
)

func main() {
	inits.InitApp()
	inits.InitMysql()
	inits.InitNaCos()
	go grpc.RegisterServices()
	conn := inits.InitConsulService("1.94.27.144:8500", "my-service-id", "my-service", 8080, "10s", "my-check-id")
	if conn != nil {
		err := conn() //连接到consul
		if err != nil {
			log.Printf("服务启动失败%v", err) //如果连接失败，输出错误信息
		}
	}
	select {}
}
